/**
 *
 */
package de.cbf.cam.dsa.services.impl.rcp_provider.factorys;

import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceFactory;
import org.osgi.framework.ServiceRegistration;

import de.cbf.cam.dsa.services.impl.rcp_provider.RCPFinder;
import de.cbf.cam.dsa.services.interfaces.rcp_provider.IServiceDSARCPFinder;

/**
 * @author salter
 *
 */
public class ServiceFactoryRCPFinder implements ServiceFactory<IServiceDSARCPFinder> {

	@Override
	public IServiceDSARCPFinder getService(Bundle bundle,
			ServiceRegistration<IServiceDSARCPFinder> registration) {
		RCPFinder result = new RCPFinder();
		//customize finder
		result.setProviderRaces(new ServiceFactoryProviderRaceDSA().getService());
		result.setProviderCultures(new ServiceFactoryProviderCultureDSA().getService());
		result.setProviderProfessions(new ServiceFactoryProviderProfessionDSA().getService());
		result.setProviderStructure(new ServiceFactoryProviderRCPStructureDSA().getService());

		return result;
	}

	@Override
	public void ungetService(Bundle bundle,
			ServiceRegistration<IServiceDSARCPFinder> registration,
			IServiceDSARCPFinder service) {
	}
}
